//
//  File.swift
//  BasicTools
//
//  Created by ikang on 2025/10/9.
//

import Foundation
import CoreLocation

public class LocationService: NSObject {
    private var locationManager = CLLocationManager()
    
    override init() {
        super.init()
        
        locationManager.delegate = self
        // 设置定位精度
        locationManager.desiredAccuracy = kCLLocationAccuracyBest
        // 位置更新最近移动距离
        locationManager.distanceFilter = 1
        // 定位活动类型
        locationManager.activityType = .fitness
        // 是否允许应用在后台更新位置
        locationManager.allowsBackgroundLocationUpdates = true
    }
    
    
    
}

extension LocationService: CLLocationManagerDelegate {
    
    
    
}


